<?php
namespace app\admin\validate;

use think\Validate;

class Bm extends Validate
{
    protected $rule = [
        'brand' => 'require',

        'status' => 'require|in:0,1',
    ];

    protected $message = [
        'color' => '{%color_val}',
        'status' => '{%status_val}',
        'create_time' => '{%create_time_val}',
    ];

    protected $scene = [
        'add'   => ['brand', 'status', 'create_time', 'update_time'],
        'edit'  => ['brand','status', 'create_time', 'update_time'],
        'status' => ['status'],
        'title' => ['title'],
        'writer' => ['writer'],
    ];
}